<html>
    <head>
        <meta charset="utf-8"/>
        <script type="text/javascript" src="ajs.js"></script>
        <script>            
            window.onload=function(){
                $.ajax({
                    url:"a1.1.php",
                    dataType:"json",
                    success:function(data){
                        document.getElementById("hd").innerHTML = data.msg
                    },
                    error: function() {
                        alert("请求失败，请稍候重试");
                    }                    
                })
            }
        </script>
    </head>
    <body>
        <div id="hd"></div>
    </body>
</html>